<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>菜单管理</title>
    <link rel="stylesheet" href="../../../static/css/layui.css" th:href="@{/css/layui.css}"/>
    <link rel="stylesheet" href="../../../static/nav/Menu.css" th:href="@{/nav/Menu.css}">
    <link rel="stylesheet" href="../../../static/Menu/Menu_update.css" th:href="@{/Menu/Menu_update.css}">
</head>
<body>

<div class="layui-form-pane" >
    <form class="layui-form">
        <input type="text" name="code" th:value="${meun.code}" style="display: none">

        <div style="display: none" th:switch="${superior}">
            <input type="text" name="codeid" th:case="'0'" th:value="${superior}">

            <input type="text" name="codeid" th:case="*"   th:value="${fucode}">
        </div>

        <div style="display: none" class="layui-input-block" th:switch="${child}">
            <input type="text" name="url" th:case="'目录'" value="">
        </div>





        <div class="layui-form-item" pane>

            <label class="layui-form-label">上级菜单</label>

            <div class="layui-input-block" th:switch="${superior}">

                <input type="text" th:case="'0'" th:value="没有上级"  required="" lay-verify="required" autocomplete="off" class="layui-input layui-disabled" readonly ="readonly">


                <input type="text" th:case="*"   th:value="${superior}"  required="" lay-verify="required" autocomplete="off" class="layui-input">

            </div>

        </div>

        <div class="layui-form-item" pane>
            <label class="layui-form-label">菜单名称</label>
            <div class="layui-input-block">
                <input type="text" name="nname" th:value="${meun.nname}" required="" lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item" pane>
            <label class="layui-form-label">图标</label>
            <div class="layui-input-block">
                <input type="text" id="icon" name="icon" th:value="${meun.icon}" required="" lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item" pane>
            <label class="layui-form-label">访问路径</label>
            <div class="layui-input-block" th:switch="${child}">
                <!--
                autocomplete="off" 禁用输入框的提示功能
                lay-verify="required"   form表单自定义验证规则
                       form.verify({
                         //数组的两个值分别代表：[正则匹配、匹配不符时的提示文字]
                         required: [
                           /^[0-4]*$/
                           ,'请填入0-4的分数'
                         ]
                       });
                required：注册浏览器所规定的必填字段
                -->
                <input type="text" th:case="'目录'" th:value="${child}"     autocomplete="off" class="layui-input layui-disabled" readonly ="readonly">

                <input type="text" name="url" th:case="*"      th:value="${meun.url}"  autocomplete="off" class="layui-input">

            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <button type="submit" class="layui-btn" lay-submit="" lay-filter="Menu">立即提交</button>
            </div>
        </div>

    </form>
</div>
<script type="text/javascript" src="../../../static/layui.js" th:src="@{/layui.js}"></script>
<script type="text/javascript" src="../../../static/Menu/Menu_update.js" th:src="@{/Menu/Menu_update.js}"></script>
</body>
</html>
